Optimal. Leaf size=135 \[ \frac {a^3 c^6 (5 B+i A) (1-i \tan (e+f x))^8}{8 f}-\frac {4 a^3 c^6 (2 B+i A) (1-i \tan (e+f x))^7}{7 f}+\frac {2 a^3 c^6 (B+i A) (1-i \tan (e+f x))^6}{3 f}-\frac {a^3 B c^6 (1-i \tan (e+f x))^9}{9 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3588, 77} \[ \frac {a^3 c^6 (5 B+i A) (1-i \tan (e+f x))^8}{8 f}-\frac {4 a^3 c^6 (2 B+i A) (1-i \tan (e+f x))^7}{7 f}+\frac {2 a^3 c^6 (B+i A) (1-i \tan (e+f x))^6}{3 f}-\frac {a^3 B c^6 (1-i \tan (e+f x))^9}{9 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 3588
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^6 \, dx &=\frac {(a c) \operatorname {Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^5 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (4 a^2 (A-i B) (c-i c x)^5-\frac {4 a^2 (A-2 i B) (c-i c x)^6}{c}+\frac {a^2 (A-5 i B) (c-i c x)^7}{c^2}+\frac {i a^2 B (c-i c x)^8}{c^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {2 a^3 (i A+B) c^6 (1-i \tan (e+f x))^6}{3 f}-\frac {4 a^3 (i A+2 B) c^6 (1-i \tan (e+f x))^7}{7 f}+\frac {a^3 (i A+5 B) c^6 (1-i \tan (e+f x))^8}{8 f}-\frac {a^3 B c^6 (1-i \tan (e+f x))^9}{9 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 11.39, size = 262, normalized size = 1.94 \[ \frac {a^3 c^6 \sec (e) \sec ^9(e+f x) (63 (B-3 i A) \cos (2 e+f x)+63 (B-3 i A) \cos (f x)-189 A \sin (2 e+f x)+168 A \sin (2 e+3 f x)-84 A \sin (4 e+3 f x)+108 A \sin (4 e+5 f x)+27 A \sin (6 e+7 f x)+3 A \sin (8 e+9 f x)-84 i A \cos (2 e+3 f x)-84 i A \cos (4 e+3 f x)+189 A \sin (f x)-63 i B \sin (2 e+f x)-84 i B \sin (4 e+3 f x)+36 i B \sin (4 e+5 f x)+9 i B \sin (6 e+7 f x)+i B \sin (8 e+9 f x)+84 B \cos (2 e+3 f x)+84 B \cos (4 e+3 f x)+63 i B \sin (f x))}{1008 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 197, normalized size = 1.46 \[ \frac {{\left (2688 i \, A + 2688 \, B\right )} a^{3} c^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (3456 i \, A - 1152 \, B\right )} a^{3} c^{6} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (864 i \, A - 288 \, B\right )} a^{3} c^{6} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (96 i \, A - 32 \, B\right )} a^{3} c^{6}}{63 \, {\left (f e^{\left (18 i \, f x + 18 i \, e\right )} + 9 \, f e^{\left (16 i \, f x + 16 i \, e\right )} + 36 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 84 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 126 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 126 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 84 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 36 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 9 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 4.46, size = 255, normalized size = 1.89 \[ \frac {2688 i \, A a^{3} c^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + 2688 \, B a^{3} c^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + 3456 i \, A a^{3} c^{6} e^{\left (4 i \, f x + 4 i \, e\right )} - 1152 \, B a^{3} c^{6} e^{\left (4 i \, f x + 4 i \, e\right )} + 864 i \, A a^{3} c^{6} e^{\left (2 i \, f x + 2 i \, e\right )} - 288 \, B a^{3} c^{6} e^{\left (2 i \, f x + 2 i \, e\right )} + 96 i \, A a^{3} c^{6} - 32 \, B a^{3} c^{6}}{63 \, {\left (f e^{\left (18 i \, f x + 18 i \, e\right )} + 9 \, f e^{\left (16 i \, f x + 16 i \, e\right )} + 36 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 84 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 126 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 126 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 84 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 36 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 9 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 193, normalized size = 1.43 \[ \frac {c^{6} a^{3} \left (-i B \left (\tan ^{3}\left (f x +e \right )\right )-\frac {i B \left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {i A \left (\tan ^{8}\left (f x +e \right )\right )}{8}-\frac {3 B \left (\tan ^{8}\left (f x +e \right )\right )}{8}-\frac {i A \left (\tan ^{6}\left (f x +e \right )\right )}{6}-\frac {3 A \left (\tan ^{7}\left (f x +e \right )\right )}{7}+\frac {i B \left (\tan ^{9}\left (f x +e \right )\right )}{9}-\frac {5 B \left (\tan ^{6}\left (f x +e \right )\right )}{6}-i B \left (\tan ^{5}\left (f x +e \right )\right )-A \left (\tan ^{5}\left (f x +e \right )\right )-\frac {3 i A \left (\tan ^{2}\left (f x +e \right )\right )}{2}-\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {5 i A \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.78, size = 191, normalized size = 1.41 \[ \frac {280 i \, B a^{3} c^{6} \tan \left (f x + e\right )^{9} + {\left (315 i \, A - 945 \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{8} - 360 \, {\left (3 \, A + i \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{7} + {\left (-420 i \, A - 2100 \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{6} - 2520 \, {\left (A + i \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{5} + {\left (-3150 i \, A - 630 \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{4} - 840 \, {\left (A + 3 i \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{3} + {\left (-3780 i \, A + 1260 \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{2} + 2520 \, A a^{3} c^{6} \tan \left (f x + e\right )}{2520 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.70, size = 208, normalized size = 1.54 \[ \frac {A\,a^3\,c^6\,\mathrm {tan}\left (e+f\,x\right )+\frac {a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-3\,B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}+a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (-B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}-\frac {a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (5\,A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4}+\frac {a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^7\,\left (-B+A\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{7}-\frac {a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (3\,A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-\frac {a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (A-B\,5{}\mathrm {i}\right )\,1{}\mathrm {i}}{6}+\frac {a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^8\,\left (A+B\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{8}+\frac {B\,a^3\,c^6\,{\mathrm {tan}\left (e+f\,x\right )}^9\,1{}\mathrm {i}}{9}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 2.14, size = 345, normalized size = 2.56 \[ \frac {- 96 A a^{3} c^{6} - 32 i B a^{3} c^{6} + \left (- 864 A a^{3} c^{6} e^{2 i e} - 288 i B a^{3} c^{6} e^{2 i e}\right ) e^{2 i f x} + \left (- 3456 A a^{3} c^{6} e^{4 i e} - 1152 i B a^{3} c^{6} e^{4 i e}\right ) e^{4 i f x} + \left (- 2688 A a^{3} c^{6} e^{6 i e} + 2688 i B a^{3} c^{6} e^{6 i e}\right ) e^{6 i f x}}{63 i f e^{18 i e} e^{18 i f x} + 567 i f e^{16 i e} e^{16 i f x} + 2268 i f e^{14 i e} e^{14 i f x} + 5292 i f e^{12 i e} e^{12 i f x} + 7938 i f e^{10 i e} e^{10 i f x} + 7938 i f e^{8 i e} e^{8 i f x} + 5292 i f e^{6 i e} e^{6 i f x} + 2268 i f e^{4 i e} e^{4 i f x} + 567 i f e^{2 i e} e^{2 i f x} + 63 i f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________